'''
cookie:  保持状态的。
1.cookie会失效
2.每个接口要带着cookie信息。
代码维护不妨斌
'''

import requests

# 没有登录时，返回的是登录页面
url = "https://www.bagevent.com/account/dashboard"
r = requests.get(url)
print(r.text)

# 登陆后，返回yoghurt的个人统计页面
hd = {"Cookie": '_ga=GA1.2.335961312.1627107219; __auc=df0dd19417ad725e77ed06f6c9d; BAG_EVENT_TOKEN_=02de735f68204d51009e7edda78e58c13a3fcdd1; BAG_EVENT_CK_KEY_="2780487875@qq.com"; BAG_EVENT_CK_TOKEN_=2440f5d17af838308ba4b390db81af38; JSESSIONID=B3E93E1C1778A646342F3AC9850374BE; BAGSESSIONID=6f5780f8-cc0b-4297-8955-fc4a7a53e782; __asc=3e68532f17ae1a0fe67ceea478c; _gid=GA1.2.998541980.1627283062; Hm_lvt_1fc37bec18db735c69ebe77d923b3ab9=1627107220,1627283062; Hm_lpvt_1fc37bec18db735c69ebe77d923b3ab9=1627283062'}
r = requests.get(url, headers=hd)
print(r.text)
